<!DOCTYPE html>
  <html>
  <head>
      <meta charset="utf-8">
      <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,width=device-width,initial-scale=1.0"/>
      <title>个人中心</title>
      <link rel="stylesheet" type="text/css" href="../../css/api.css" />
      <link rel="stylesheet" type="text/css" href="../../css/common.css" />
      <link rel="stylesheet" type="text/css" href="../../css/aui.css" />
    	<link rel="stylesheet" type="text/css" href="../../css/aui-pull-refresh.css" />
      <style>
          html, body {width: 100%;min-height: 100%;background: #F3EFEE;}
          .aui-active .aui-bar-tab-label{
            color: #f5a51c
          }
          .login {height:240px;background-image: -webkit-linear-gradient(0deg, #f5c674, #ed824c);/*background-image: url(../../image/personal_bkg.jpg);background-repeat: no-repeat; background-size: cover;*/position: relative;}
      	.login .personal_logo {width: 4rem;height: 4rem;border-radius: 50%;margin: 0 auto 9px;/*position: absolute; top: 60px; left: 20px;*/}
      		.login .userinfo {position: absolute; top: 60px;text-align: center; left: 0; right: 0;}
      		.login .userinfo .title {font-size: 0.8rem; color: #fff;}

      		/* 设置条目 */
      		.item {height: 3rem;line-height: 3rem;padding-left: 0.7rem;background-color: #fff;}
      		.item_ico {float: left;width: 2.3rem;padding: 0.7rem 0.7rem 0.7rem 0;}
      		.item_arrow {float: right;width: 1.5rem;padding: 1rem 0.7rem 1rem 0;}
      		.item span {font-size: 0.7rem;}
          [v-cloak] {
              display: none;
          }
          .aui_list{
              background-image: linear-gradient(0,#eee,#eee 50%,transparent 50%);
          }
          .aui-list-item{
              background-image:linear-gradient(0,#eee,#eee 50%,transparent 50%) !important;
          }
          .aui-radio:checked{
            background: #f23030;
            border-color: #f23030;
            width: 0.8rem;
            height: 0.8rem;
            position: relative;
            top: 0.25rem;
            margin-right: 0.5rem;
          }
          .aui-toast-content{
            color: #fff;
          }
          [v-cloak]{
            display: none;
          }
      </style>
  </head>
  <body>
<div id="app" v-cloak>

<div class="user_nav_line"></div>
    <ul class="aui-list aui-form-list">
      <li class="aui-list-item">
          <div class="aui-list-item-inner">
              <div class="aui-list-item-label" style="width: 29%;">
                  合作机构
              </div>
              <div class="aui-list-item-input">
                  <input type="text" placeholder="请填写合作方名称" style="font-size: 0.7rem;" v-model="Institution">
              </div>
            </div>
        </li>
        <li class="aui-list-item">
            <div class="aui-list-item-inner">
                <div class="aui-list-item-label" style="width: 29%;">
                    联系方式
                </div>
                <div class="aui-list-item-input">
                    <input type="text" placeholder="请填写联系方式" style="font-size: 0.7rem;" v-model="userMobile">
                </div>
              </div>
          </li>
          <li class="aui-list-item">
              <div class="aui-list-item-inner">
                  <div class="aui-list-item-label" style="width: 29%;">
                      总负责人
                  </div>
                  <div class="aui-list-item-input">
                      <input type="text" placeholder="请填写合作负责人" style="font-size: 0.7rem;" v-model="realname">
                  </div>
                </div>
          </li>
          <li><div class="user_nav_line"></div></li>
          <li class="aui-list-item">
              <div class="aui-list-item-inner">
                  <div class="aui-list-item-label" style="width: 29%;">
                      合作详情
                  </div>
                </div>
            </li>
          <li class="aui-list-item">
            <textarea name="name" rows="8" cols="80" style="font-size:0.7rem;color:#999;height: 6rem;" v-model="content">请填写相应的合作信息</textarea>
          </li>
          <li class="aui-list-item" style="background: #F3EFEE;padding-top: 0.3rem;">
           <div class="aui-list-item-inner">
               <label   style="font-size:0.6rem;"><input class="aui-radio" type="radio" name="radio" checked> 我已认真阅读并同意 <div style="color:#f23030;font-size:0.6rem;display:inline" @click='businessc'>《商务合作协议》</div></label>
           </div>
       </li>
       <li style="background: #F3EFEE;padding-top:1.5rem;padding-bottom:1.5rem;"> <div style="border-radius: 1.5rem;width:79vw;height:2.3rem;color:#fff;text-align:center;line-height:2.3rem;background:#f23030;margin:0 auto" @click="tostSucess()">提交</div></li>
       <li class="aui-list-item"  style="background: #F3EFEE;">
          <div class="aui-list-item-label-icon" style="width:2rem;">
              <img src="../../image/my/m55.png" alt="">
          </div>
          <div class="aui-list-item-inner" style="color:#f23030;font-size:0.8rem;">
              {{userPhone}}
          </div>
      </li>
    </ul>

<div>
<!--弹框-->

</div>
  </body>
  <script type="text/javascript" src="../../script/api.js"></script>
  <script type="text/javascript" src="../../script/zepto.js"></script>
  <script type="text/javascript" src="../../script/vue.min.js"></script>
  <script type="text/javascript" src="../../script/utils.js"></script>
  <script type="text/javascript" src="../../script/common.js"></script>
  <script type="text/javascript" src="../../script/aui-tab.js"></script>
  <script type="text/javascript" src="../../script/aui-scroll.js"></script>
  <script type="text/javascript" src="../../script/aui-pull-refresh.js"></script>
  <script type="text/javascript" src="../../script/aui-popup.js"></script>
  <script type="text/javascript" src="../../script/aui-dialog.js"></script>
  <script type="text/javascript" src="../../script/aui-toast.js"></script>
  <script type="text/javascript">

      var popup = new auiPopup();
         function showPopup(){
             popup.show(document.getElementById("top-right"))
         }


  </script>
  <script>
  apiready = function(){
     var toast = new auiToast({});
      new Vue({
        el:'#app',
        data:{
          Institution:'',
          realname:'',
          userMobile:'',
          content:'',
          userPhone:'',
          userUrl:''
        },
        methods:{
          //提交
          tostSucess:function(){
            var _this = this;
            api.ajax({
                url: window.Url.Freecooperation_addCooperation,
                method: 'post',
                data: {
                    values: {
                        token:$api.getStorage('token'),
                        institutions:_this.Institution,
                        realname:_this.realname,
                        mobile: Base64.encode('UNO' + _this.userMobile + 'HACHA'),
                        content:_this.content,
                        is_agree:1
                    }
                }
            },function(ret, err){
              // alert( JSON.stringify( ret ) );
                if (ret.re==1) {
                    toast.success({
                          title:ret.info,
                          duration:1000
                      });
                      setTimeout(function() {
                        api.closeWin({});
                      },1000)
                }else{
                  toast.fail({
                    title:ret.info,
                    duration:1000
                  })
                }
            });

          },
            //客服电话
            userMsg:function(){
              var _this = this;
              api.ajax({
                  url: window.Url.Freecooperation_getData,
                  method: 'post',
                  data: {
                      values: {
                        token:$api.getStorage('token')
                      }

                  }
              },function(ret, err){
                  if (ret.re==1) {
                      //alert( JSON.stringify( ret ) );
                      _this.userPhone = ret.data.kefu_tel;
                      _this.userUrl = ret.data.url;
                  } else {
                    toast.fail({
                      title:ret.info,
                      duration:1000
                    })
                  }
              });

            },
            businessc:function(){
              var _this = this;
              api.openWin({
                 name: 'url',
                 url:_this.userUrl,
                 });
             }
        },
        mounted:function(){
          this.userMsg();
        }
      })
  };

  </script>
  </html>
